Computing systems execute software programs for performing tasks. The operating system of a computing system includes a scheduler, and the computing system executes the tasks selected by the scheduler. When a task completes execution on the computer system, the scheduler selects another task for execution on the computing system. When a task requests a service from the operating system, the scheduler can select another task for execution, especially when the operating system cannot immediately provide the service. When multiple tasks are ready for execution, the scheduler can ensure that the computing system executes all of the tasks by periodically interrupting the current task and selecting another task awaiting execution.
In some instances the computing system may need to execute a particular task to respond properly to an asynchronous event that is external to the computing system. For example, a peripheral device may notify the computing system of the external event, and the scheduler can interrupt the execution of the current task and select a task that processes the external event. Thus, both internal and external events can cause the scheduler to switch the task executing on the computing system.
Efficient management of the tasks can improve the performance of the computing system, as can increasing the number of processors in the computing system. However, increasing the number of processors also complicates the efficient management of tasks, because the computing system must assign each task to a processor. The computing system could assign certain tasks to each processor, but a processor does not contribute to the performance of the computing system whenever the processor is idle, because none of its assigned tasks is ready for execution.
The present invention may address one or more of the above issues.